package com.ruoyi.xsp.domain;

import java.util.Date;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 用户管理对象 xsp_user
 * 
 * @author zhiminhu
 * @date 2021-01-22
 */
public class XspUser extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 用户ID */
    private Long userId;

    /** 短号码 */
    @Excel(name = "短号码")
    private Long userCode;

    /** 登录账号 */
    @Excel(name = "登录账号")
    private String loginName;

    /** 昵称 */
    @Excel(name = "昵称")
    private String nickname;

    /** 真实姓名 */
    @Excel(name = "真实姓名")
    private String realName;

    /** 用户类型 */
    @Excel(name = "用户类型")
    private String userType;

    /** 用户邮箱 */
    @Excel(name = "用户邮箱")
    private String email;

    /** 手机号码 */
    @Excel(name = "手机号码")
    private String phonenumber;

    /** 生日 */
    private Date birthday;

    /** 用户性别 */
    @Excel(name = "用户性别")
    private String sex;

    /** 头像路径 */
    @Excel(name = "头像路径")
    private String avatar;

    /** 密码 */
    @JSONField(serialize = false)
    private String password;

    /** 盐加密 */
    @JSONField(serialize = false)
    private String salt;

    /** 个性签名 */
    @Excel(name = "个性签名")
    private String idiograph;

    /** 个人简介 */
    @Excel(name = "个人简介")
    private String profile;

    /** 帐号状态 */
    @Excel(name = "帐号状态")
    private String status;

    /** 地址 */
    @Excel(name = "地址")
    private String location;

    /** 公司名 */
    @Excel(name = "公司名")
    private String company;

    /** 博客地址 */
    @Excel(name = "博客地址")
    private String blog;

    /** 职业 */
    @Excel(name = "职业")
    private String worker;

    /** 删除标志 */
    @JSONField(serialize = false)
    private String delFlag;

    /** 最后登录IP */
    @Excel(name = "最后登录IP")
    private String loginIp;

    /** 最后登录时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "最后登录时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date loginDate;

    /** 密码最后更新时间 */
    private Date pwdUpdateDate;

    private boolean newUser;
    /**  用户token */
    private String token;
    /**
     * 粉丝数量
     */
    public int fansCount;
    /**
     * 我关注的人数量
     */
    public int concernedCount;
    /**
     * 获赞数量
     */
    public int likeCount;
    /**
     * 作品数量
     */
    public int newsCount;
    /**
     * 喜欢作品数量
     */
    public int likeNewsCount;

    /** 是否关注作者  用于查看其它人的时候使用*/
    private boolean IConcernedIt;

    /**
     * 当前登陆用户ID 默认为null
     * 当前登陆的情况下根据此字段获取改数据 是否被当前用户关注与点赞与收藏
     */
    private Long loginUserCode;

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }
    public boolean isNewUser() {
        return newUser;
    }

    public void setNewUser(boolean newUser) {
        this.newUser = newUser;
    }

    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }
    public void setUserCode(Long userCode)
    {
        this.userCode = userCode;
    }

    public Long getUserCode()
    {
        return userCode;
    }
    public void setLoginName(String loginName) 
    {
        this.loginName = loginName;
    }

    public String getLoginName() 
    {
        return loginName;
    }
    public void setNickname(String nickname) 
    {
        this.nickname = nickname;
    }

    public String getNickname() 
    {
        return nickname;
    }
    public void setRealName(String realName) 
    {
        this.realName = realName;
    }

    public String getRealName() 
    {
        return realName;
    }
    public void setUserType(String userType) 
    {
        this.userType = userType;
    }

    public String getUserType() 
    {
        return userType;
    }
    public void setEmail(String email) 
    {
        this.email = email;
    }

    public String getEmail() 
    {
        return email;
    }
    public void setPhonenumber(String phonenumber) 
    {
        this.phonenumber = phonenumber;
    }

    public String getPhonenumber() 
    {
        return phonenumber;
    }
    public void setBirthday(Date birthday) 
    {
        this.birthday = birthday;
    }

    public Date getBirthday() 
    {
        return birthday;
    }
    public void setSex(String sex) 
    {
        this.sex = sex;
    }

    public String getSex() 
    {
        return sex;
    }
    public void setAvatar(String avatar) 
    {
        this.avatar = avatar;
    }

    public String getAvatar() 
    {
        return avatar;
    }
    public void setPassword(String password) 
    {
        this.password = password;
    }

    public String getPassword() 
    {
        return password;
    }
    public void setSalt(String salt) 
    {
        this.salt = salt;
    }

    public String getSalt() 
    {
        return salt;
    }
    public void setIdiograph(String idiograph) 
    {
        this.idiograph = idiograph;
    }

    public String getIdiograph() 
    {
        return idiograph;
    }
    public void setProfile(String profile) 
    {
        this.profile = profile;
    }

    public String getProfile() 
    {
        return profile;
    }
    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }
    public void setLocation(String location) 
    {
        this.location = location;
    }

    public String getLocation() 
    {
        return location;
    }
    public void setCompany(String company) 
    {
        this.company = company;
    }

    public String getCompany() 
    {
        return company;
    }
    public void setBlog(String blog) 
    {
        this.blog = blog;
    }

    public String getBlog() 
    {
        return blog;
    }
    public void setWorker(String worker) 
    {
        this.worker = worker;
    }

    public String getWorker() 
    {
        return worker;
    }
    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }
    public void setLoginIp(String loginIp) 
    {
        this.loginIp = loginIp;
    }

    public String getLoginIp() 
    {
        return loginIp;
    }
    public void setLoginDate(Date loginDate) 
    {
        this.loginDate = loginDate;
    }

    public Date getLoginDate() 
    {
        return loginDate;
    }
    public void setPwdUpdateDate(Date pwdUpdateDate) 
    {
        this.pwdUpdateDate = pwdUpdateDate;
    }

    public Date getPwdUpdateDate() 
    {
        return pwdUpdateDate;
    }

    public int getFansCount() {
        return fansCount;
    }

    public void setFansCount(int fansCount) {
        this.fansCount = fansCount;
    }

    public int getConcernedCount() {
        return concernedCount;
    }

    public void setConcernedCount(int concernedCount) {
        this.concernedCount = concernedCount;
    }

    public int getLikeCount() {
        return likeCount;
    }

    public void setLikeCount(int likeCount) {
        this.likeCount = likeCount;
    }

    public int getNewsCount() {
        return newsCount;
    }

    public void setNewsCount(int newsCount) {
        this.newsCount = newsCount;
    }

    public int getLikeNewsCount() {
        return likeNewsCount;
    }

    public void setLikeNewsCount(int likeNewsCount) {
        this.likeNewsCount = likeNewsCount;
    }

    public boolean isIConcernedIt() {
        return IConcernedIt;
    }

    public void setIConcernedIt(boolean IConcernedIt) {
        this.IConcernedIt = IConcernedIt;
    }

    public Long getLoginUserCode() {
        return loginUserCode;
    }

    public void setLoginUserCode(Long loginUserCode) {
        this.loginUserCode = loginUserCode;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("userId", getUserId())
            .append("userCode", getUserCode())
            .append("loginName", getLoginName())
            .append("nickname", getNickname())
            .append("realName", getRealName())
            .append("userType", getUserType())
            .append("email", getEmail())
            .append("phonenumber", getPhonenumber())
            .append("birthday", getBirthday())
            .append("sex", getSex())
            .append("avatar", getAvatar())
            .append("password", getPassword())
            .append("salt", getSalt())
            .append("idiograph", getIdiograph())
            .append("profile", getProfile())
            .append("status", getStatus())
            .append("location", getLocation())
            .append("company", getCompany())
            .append("blog", getBlog())
            .append("worker", getWorker())
            .append("delFlag", getDelFlag())
            .append("loginIp", getLoginIp())
            .append("loginDate", getLoginDate())
            .append("pwdUpdateDate", getPwdUpdateDate())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
